﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="News.ascx.cs" Inherits="module_News" %>

<%
    ArticleBusiness article = new ArticleBusiness();
    PanelBusiness p = new PanelBusiness();
    PanelesEntities entity = p.getItem(ID);
    int chanel_id = Helper.getQuery("cid");
    if (chanel_id == 0) { chanel_id = entity._channelID; }
    if (Display_Container.Trim().Equals("True") || Display_Container.Trim().Equals("1"))
    {
        Response.Write("<div id=\"new_tt\">"+entity._name+"</div>");
    }
    ArrayList items = article.viewArticle_panel(ID);
    if (items != null)
    {
        ArticlesEntities item = null;
        Response.Write("<div id=\"new_article\">");
        int l=1;
        if (items.Count >= 7)
        {
            l = 7;
        }
        else
        {
            l = items.Count;
        }
        for (int i = 0; i <l ; i++)
        {
            item = (ArticlesEntities)items[i];
            Response.Write("<i>" + (i + 1).ToString() + ".&nbsp;&nbsp;</i><a href=\"Default.aspx?url=module/tmp.ascx&aid=" + item._articlesID.ToString() + "&cid=" + chanel_id.ToString() + "&pid=" + ID.ToString() + " \">"+item._name + "</a><br/>");
        }
        Response.Write("</div>");
    }
     %>